package com.zbkj.crmeb.order.response;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.List;


@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class ImOrderLogisticsInfoResponse implements Serializable {

    @JsonProperty(value = "code")
    private String code;

    @JsonProperty(value = "message")
    private String message;

    @JsonProperty(value = "success")
    private boolean success;

    @JsonProperty(value = "timestamp")
    private Long timestamp;

    @JsonProperty(value = "error")
    private String error;

    @JsonProperty(value = "data")
    private Result data;

    @Data
    @JsonIgnoreProperties(ignoreUnknown = true)
    public static class Result {

        @JsonProperty(value = "orderLineNum")
        private String orderLineNum;

        @JsonProperty(value = "logisticsNo")
        private String logisticsNo;

        @JsonProperty(value = "logisticsCompany")
        private String logisticsCompany;

        @JsonProperty(value = "logisticsList")
        private List<Logistics> logisticsList;

        @Data
        @JsonIgnoreProperties(ignoreUnknown = true)
        public static class Logistics {

            @JsonProperty(value = "logisticsNo")
            private String logisticsNo;

            @JsonProperty(value = "logisticsCompany")
            private String logisticsCompany;

            @JsonProperty(value = "logisticsActivityList")
            private List<LogisticsActivity> logisticsActivityList;

            @Data
            @JsonIgnoreProperties(ignoreUnknown = true)
            public static class LogisticsActivity {

                @JsonProperty(value = "time")
                private Date time;

                @JsonProperty(value = "remark")
                private String remark;

            }
        }
    }
}
